package com.zbec.mdrs.entity.report;

import com.zbec.framework.core.entity.IdEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;


@Entity
@Table(name = "TB_REPORT_FILE_REL")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ReportFileRel extends IdEntity {

    private ReportFile file;
	private Long recordId;
	private Integer lineNum;

    @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY)
    @JoinColumn(name = "FILE_ID", referencedColumnName = "ID")
    @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
    public ReportFile getFile() {
        return file;
    }

    public void setFile(ReportFile file) {
        this.file = file;
    }

    public Long getRecordId() {
        return recordId;
    }

    public void setRecordId(Long recordId) {
        this.recordId = recordId;
    }

    public Integer getLineNum() {
        return lineNum;
    }

    public void setLineNum(Integer lineNum) {
        this.lineNum = lineNum;
    }
}